<script setup>
import { ref } from 'vue';

const statusList = ref([
  { label: '全部', value: 0 },
  { label: '合格', value: 1 },
  { label: '不合格', value: 2 },
  { label: '未设置', value: 3 },
]);

const status = ref(0);

const columns = ref([
  {
    title: '序号',
    customRender: ({ index }) => index + 1,
  },
  {
    title: '抽验包ID',
    dataIndex: 'id',
  },
  {
    title: '创建人',
    dataIndex: 'user_id',
  },
  {
    title: '昵称',
    dataIndex: 'customer_name',
  },
  {
    title: '抽验方式',
    dataIndex: '整包',
  },
  {
    title: '样本数量（题）',
    dataIndex: 'total_num',
  },
  {
    title: '已抽验（题）',
    dataIndex: 'has_spot_check',
  },
  {
    title: '通过（题）',
    dataIndex: 'pass_num',
  },
  {
    title: '通过率',
    dataIndex: 'pass_rate',
  },
  {
    title: '准确率',
    dataIndex: 'accuracy_rate',
  },
  {
    title: '抽验进度',
    dataIndex: 'status',
  },
  {
    title: '操作',
    customRender: () => '',
  },
]);

const dataSource = ref([
  {
    accuracy_rate: "99.59%",
    created_at: "2022-10-19 13:45:54",
    customer_name: "奕斯伟-验收",
    customer_pass_status: 0,
    has_spot_check: 808,
    id: 42972,
    operation: ["check", "report"],
    pack_status: 1,
    pass_num: 671,
    pass_rate: "83.04%",
    postils: [{ label: "漏标", val: 28 }, { label: "错标", val: 27 }, { label: "多标", val: 14 }],
    status: "已完成",
    tools: [{ label: "矩形", val: 16736 }],
    total_num: 808,
    type: "整包",
    user_id: "liuwenjie@eswincomputing.com",
  }
]);
</script>

<template>
  <a-table :columns="columns" :data-source="dataSource"></a-table>
</template>
